package com.qiaofang.applet.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 房源类型
 * @author daiyuxiang
 */
@Getter
@AllArgsConstructor
public enum BusinessConstants {

    FIRSTHAND_ESTATE("新房",1),
    SALE_PROPERTY("二手房",2),
    RENT_PROPERTY("租房",3),
    EMPLOYEE("经纪人",4),
    ESTATE("小区",5),
    MEMBER("会员",6);

    private String value;

    private Integer code;

    public static String getValueByCode(Integer businessType){

        for (BusinessConstants value : values()) {
            if (value.getCode().equals(businessType)){
                return value.getValue();
            }
        }
        return null;
    }
}
